<?php if(!isset($_POST['area'])){
			$user = '';
			$age = '';
		if(isset($_POST['user'])){
			$user = $_POST['user'];
			$age = $_POST['age'];
			
			$xmlData= new SimpleXMLElement("<xml></xml>");

			// Adding chld nodes
			$xmlUser=$xmlData->addChild("USER");

			// Adding attributes
			$xmlUser->addAttribute("name", $_POST['user']);

			$xmlUser->addChild("age", $_POST['age']);
			
			$xmlData->asXML("test.xml");
			
			//echo $xmlData->USER->attributes()->name. "\n";
			//echo $xmlData->USER->age. "\n";
			//echo "xml : ".$xmlData->asXML();
			}
?>	
		<div id="flashContent">
			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="map" align="middle">
				<param name="movie" value="flash/map.swf" />
				<param name="FlashVars" value="user=<?php echo $user;?>&age=<?php echo $age;?>&xml=test.xml"/>
				<param name="quality" value="high" />
				<param name="bgcolor" value="#ffffff" />
				<param name="play" value="true" />
				<param name="loop" value="true" />
				<param name="wmode" value="window" />
				<param name="scale" value="showall" />
				<param name="menu" value="true" />
				<param name="devicefont" value="false" />
				<param name="salign" value="" />
				<param name="allowScriptAccess" value="sameDomain" />
				<!--[if !IE]>-->
				<object type="application/x-shockwave-flash" data="flash/map.swf" width="550" height="400">
					<param name="movie" value="flash/map.swf" />
					<param name="FlashVars" value="user=<?php echo $user;?>&age=<?php echo $age;?>&xml=<?php echo $xmlData->asXML();?>"/>
					<param name="quality" value="high" />
					<param name="bgcolor" value="#ffffff" />
					<param name="play" value="true" />
					<param name="loop" value="true" />
					<param name="wmode" value="window" />
					<param name="scale" value="showall" />
					<param name="menu" value="true" />
					<param name="devicefont" value="false" />
					<param name="salign" value="" />
					<param name="allowScriptAccess" value="sameDomain" />
				<!--<![endif]-->
					<a href="http://www.adobe.com/go/getflash">
						<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Obtenir Adobe Flash Player" />
					</a>
				<!--[if !IE]>-->
				</object>
				<!--<![endif]-->
			</object>
		</div>
		<a href="index.php?page=test">Back</a>
<?php }else{?>
<br>
<a href="index.php?page=map">Back to map</a>
<?php }?>
	 